package com.yidi.quartz.service;

import com.yidi.common.core.service.BaseService;
import com.yidi.common.exception.job.TaskException;
import com.yidi.quartz.domain.SysJob;
import org.quartz.SchedulerException;
import org.springframework.data.domain.Page;

/**
 * @author ：Xn
 * @ClassName: SysJobService
 * @date ：2021-10-19 9:25
 * @describe ：定时任务调度表
 */
public interface SysJobService extends BaseService<SysJob> {

    Page<SysJob> findByPage(Integer pageNo, Integer pageSize, SysJob job);

    void insertJob(SysJob job) throws SchedulerException, TaskException;

    void updateJob(SysJob job) throws SchedulerException, TaskException;

    void changeStatus(SysJob job) throws SchedulerException;

    void resumeJob(SysJob job) throws SchedulerException;

    void pauseJob(SysJob job) throws SchedulerException;

    void run(SysJob job) throws SchedulerException;

    void deleteJobByIds(Long[] jobIds) throws SchedulerException;

    void deleteJob(SysJob job) throws SchedulerException;
}
